//
//  TestRecordModel.swift
//  Auscultation
//
//  Created by 张文博 on 2021/4/4.
//

import Foundation
import HandyJSON
struct TestRecordModel : HandyJSON {
    var createdTime = ""
    var examBeginTime = ""
    var examEndTime = ""
    
    var id = ""
    var paperId = ""
    var passScore = ""
    var score = ""
    var status = ""
    var totalScore = ""
    var userId = ""
    
    lazy var testTimeString: String = {
        let time = (examEndTime.int ?? 0) - (examBeginTime.int ?? 0)
        let secondInt = time / 1000
        return secondsToFormat(seconds: secondInt)
        
    }()

    lazy var createdTimeString: String = {
        return String.lgf_TimeStampSwitchTimeStr(timeStamp: self.createdTime, format: "YYYY-MM-dd HH:mm:ss")
    }()

   lazy var examBeginTimeString: String = {
        return String.lgf_TimeStampSwitchTimeStr(timeStamp: self.examBeginTime, format: "YYYY-MM-dd HH:mm:ss")
    }()
    
    lazy var examEndTimeString: String = {
            return String.lgf_TimeStampSwitchTimeStr(timeStamp: self.examEndTime, format: "YYYY-MM-dd HH:mm:ss")
    }()
}
